package io.renren.modules.app.entity;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import io.renren.modules.app.form.OrderForm;

import java.io.Serializable;
import java.util.Date;

/**
 * @Auther zxl
 * @Date 2018/12/15 19:30
 * @Description 订单
 **/
@TableName("app_build_order")
public class OrderEntity implements Serializable {

    /**
     * 表自增id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    /**
     * 订单编号
     */
    @TableId(value = "order_id")
    private String orderId;

    /**
     * 用户id
     */
    @TableId(value = "user_id")
    private Long userId;

    /**
     * 代理商id
     */
    @TableId(value = "agent_id")
    private Integer agentId;

    /**
     * 预约时间
     */
    @TableId(value = "order_time")
    private Date orderTime;

    /**
     * 燃油类型
     * 燃油类型：
     * 1汽油，
     * 2柴油，
     * 3混合油，
     * 4液化石油气，
     * 5天然气，
     * 6甲醇，
     * 7乙醇，
     * 8太阳能，
     * 9电，
     * 10生物燃料，
     * 11氢
     */
    @TableId(value = "fuel_type")
    private Integer fuelType;

    /**
     * 驱动类型
     * 1：前驱；2：后驱；3：四驱
     */
    @TableId(value = "driver_type")
    private Integer driverType;

    /**
     * 下单时间
     */
    @TableId(value = "create_time")
    private Date createTime;

    /**
     * 订单状态：
     * 1：下单成功；2：支付成功；3：配单成功；4：开始检车；5：订单完成；
     * 6：评论完成；7：订单拒绝；8：取消订单；9：订单处理失败；10：订单修改
     *
     */
    @TableId(value = "order_state")
    private Integer orderState;

    /**
     * 订单完成时间
     */
    @TableId(value = "close_time")
    private Date closeTime;

//    /**
//     * 支付状态
//     * 0：未完成支付
//     * 1：已完成支付
//     */
//    @TableId(value = "pay_state")
//    private Integer payState;
//
//    /**
//     * 支付时间
//     */
//    @TableId(value = "pay_time")
//    private Date payTime;

    /**
     * 车外照片
     */
    @TableId(value = "final_outside_pic_url")
    private String finalOutsidePicUrl;

    /**
     * 车内照片
     */
    @TableId(value = "final_inside_pic_url")
    private String finalInsidePicUrl;

    /**
     * 订单打分
     */
    @TableId(value = "order_score")
    private Integer orderScore;

    /**
     * 订单评语
     */
    @TableId(value = "order_assess")
    private String orderAssess;

    /**
     * 订单标题
     */
    @TableId(value = "order_subject")
    private String orderSubject;

    /**
     * 订单金额
     */
    @TableId(value = "order_money")
    private Double orderMoney;

    /**
     * 接待者姓名
     */
    @TableId("receiver_name")
    private String receiver_name;

    /**
     * 接待者手机号
     */
    @TableId("receive_call")
    private String receive_call;

    /**
     * 拒单缘由
     */
    @TableId("reject_reason")
    private String rejectReason;

    public OrderEntity(){}

    public OrderEntity(OrderForm orderForm) {
        this.agentId = orderForm.getAgentId();
        this.orderTime = orderForm.getOrderTime();
        this.fuelType = orderForm.getFuelType();
        this.driverType = orderForm.getDriverType();
    }

    public String getRejectReason() {
        return rejectReason;
    }

    public void setRejectReason(String rejectReason) {
        this.rejectReason = rejectReason;
    }

    public String getReceiver_name() {
        return receiver_name;
    }

    public void setReceiver_name(String receiver_name) {
        this.receiver_name = receiver_name;
    }

    public String getReceive_call() {
        return receive_call;
    }

    public void setReceive_call(String receive_call) {
        this.receive_call = receive_call;
    }

    public String getOrderSubject() {
        return orderSubject;
    }

    public void setOrderSubject(String orderSubject) {
        this.orderSubject = orderSubject;
    }

    public Double getOrderMoney() {
        return orderMoney;
    }

    public void setOrderMoney(Double orderMoney) {
        this.orderMoney = orderMoney;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getAgentId() {
        return agentId;
    }

    public void setAgentId(Integer agentId) {
        this.agentId = agentId;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public Integer getFuelType() {
        return fuelType;
    }

    public void setFuelType(Integer fuelType) {
        this.fuelType = fuelType;
    }

    public Integer getDriverType() {
        return driverType;
    }

    public void setDriverType(Integer driverType) {
        this.driverType = driverType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getOrderState() {
        return orderState;
    }

    public void setOrderState(Integer orderState) {
        this.orderState = orderState;
    }

    public Date getCloseTime() {
        return closeTime;
    }

    public void setCloseTime(Date closeTime) {
        this.closeTime = closeTime;
    }

    public String getFinalOutsidePicUrl() {
        return finalOutsidePicUrl;
    }

    public void setFinalOutsidePicUrl(String finalOutsidePicUrl) {
        this.finalOutsidePicUrl = finalOutsidePicUrl;
    }

    public String getFinalInsidePicUrl() {
        return finalInsidePicUrl;
    }

    public void setFinalInsidePicUrl(String finalInsidePicUrl) {
        this.finalInsidePicUrl = finalInsidePicUrl;
    }

    public Integer getOrderScore() {
        return orderScore;
    }

    public void setOrderScore(Integer orderScore) {
        this.orderScore = orderScore;
    }

    public String getOrderAssess() {
        return orderAssess;
    }

    public void setOrderAssess(String orderAssess) {
        this.orderAssess = orderAssess;
    }

    @Override
    public String toString() {
        return "OrderEntity{" +
                "id=" + id +
                ", orderId='" + orderId + '\'' +
                ", userId=" + userId +
                ", agentId=" + agentId +
                ", orderTime=" + orderTime +
                ", fuelType=" + fuelType +
                ", driverType=" + driverType +
                ", createTime=" + createTime +
                ", orderState=" + orderState +
                ", closeTime=" + closeTime +
                ", finalOutsidePicUrl='" + finalOutsidePicUrl + '\'' +
                ", finalInsidePicUrl='" + finalInsidePicUrl + '\'' +
                ", orderScore=" + orderScore +
                ", orderAssess='" + orderAssess + '\'' +
                ", orderSubject='" + orderSubject + '\'' +
                ", orderMoney=" + orderMoney +
                '}';
    }
}
